<div class="backend clearfix">

	<h2>All Categories1</h2>
	
	<ul class="crud clearfix">
		<li><?=anchor('admin/entries', 'View All Entries', array('class' => 'view', 'title' => 'View all entries'))?></li>
		<li><?=anchor('admin/categories/add', 'Add Category', array('class' => 'add inline', 'title' => 'Add a new category'))?></li>
	</ul>
	
	<table class="table">
		
		<thead>
			<tr>
				<th>Category</th>
				<th>Description</th>
				<th colspan="2"><span id="tip" class="functions text-center">&nbsp;</span></th>
			</tr>
		</thead>
		
		<tbody>
		<?php foreach($categories as $category): ?>
		<tr>
			<td><?=$category->name?></td>
			<td><?=$category->description?></td>
			<td class="functions">
				<?=anchor('admin/entries/category/'.$category->category_id, 'Entries', array('class' => 'icon detail tip', 'title' => 'Show Entries'))?>
				<?=anchor('admin/categories/edit/'.$category->category_id, 'Edit', array('class' => 'icon edit tip', 'title' => 'Edit'))?>	
				<?=anchor('admin/categories/remove/'.$category->category_id, 'Delete', array('class' => 'confirm icon delete tip', 'title' => 'Delete'))?>
			</td>
		</tr>
		<?php endforeach ?>
		</tbody>
		
	</table>
	&laquo; <?php echo anchor('admin', 'Back to Admin Home Page')?>
</div>
